﻿CREATE PROCEDURE [dbo].[CarregarServicoModelos]
    @tipo VARCHAR(50),
    @marca VARCHAR(50)
AS

SELECT DISTINCT LTRIM(RTRIM(Modelo)) AS Modelo
FROM Servico
WHERE LTRIM(Modelo) <> ''
  AND ISNULL(Tipo, '') = ISNULL(@tipo, ISNULL(Tipo, ''))
  AND ISNULL(Marca, '') = ISNULL(@marca, ISNULL(Marca, ''))
ORDER BY Modelo